﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ShowDiscussionsByUser.aspx.vb" Inherits="HauntedNetworkingSite.ShowDiscussionsByUser" %>

<%@ Register src="Banner.ascx" tagname="Banner" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Show Discussions By User</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <uc1:Banner ID="Banner1" runat="server" />
    
    </div>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        Showing discussions started by  
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </p>
    <p>
        &nbsp;</p>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" 
        DataSourceID="ShowDiscussionsByUserDataSource" GridLines="Horizontal" Width="80%" HorizontalAlign="Center" HeaderStyle-CssClass="titleClass">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="DiscussionTopic.aspx?ID={0}" DataTextField="Topic" 
                HeaderText="Topic" />
            <asp:BoundField DataField="Tags" HeaderText="Tags" SortExpression="Tags" />
            <asp:BoundField DataField="Category_Title" HeaderText="Category" 
                SortExpression="Category_Title" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="ShowDiscussionsByUserDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PlacesConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:PlacesConnectionString.ProviderName %>" 
        
        SelectCommand="SELECT [ID], [Topic], [Body], [Tags], [Category Title] AS Category_Title, [StartedBy] FROM [discussionforumQuery] WHERE ([StartedBy] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="StartedBy" QueryStringField="UserName" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    </form>
    </body>
</html>
